package com.base.cn.platform.os.service.manage.user.account;

import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.manage.BaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.Map;

/**
 * 用户提现记录接口
 *
 * @author s.li
 * @date 2018/12/01
 */
@FeignClient(name = BaseService.appName,configuration = FeignAuthConfig.class)
public interface CusUserCashRecordService extends BaseService {

    /**
     * 保存用户申请提现记录
     *
     * @param userCashRecord
     * @return Map<String , Object>
     */
    @RequestMapping(contextPath + "/account/createUserCashRecord")
    Map<String, Object> createUserCashRecord(@RequestBody Map<String, Object> userCashRecord);

    /**
     * 分成查询用户提现记录列表
     *
     * @param condition   查询条件
     * @param currentPage 页码
     * @param pageSize    查询数量
     * @return PageInfo<CusUserCashRecord>
     */
    @RequestMapping(contextPath + "/account/findUserCashRecordListPage")
    Map<String, Object> findUserCashRecordListPage(@RequestBody Map<String, Object> condition,
                                                   @RequestParam(value = "currentPage", required = false, defaultValue = "1") int currentPage,
                                                   @RequestParam(value = "pageSize", required = false, defaultValue = "10") int pageSize);

    /**
     * 审核提现记录
     * @param id 记录ID
     * @param sysUserId 管理员ID
     * @param status 状态，2通过，3驳回
     * @param rejectText 返回原因
     * @return Map<String, Object>
     */
    @RequestMapping(contextPath + "/account/auditPass")
    Map<String, Object> auditPass(@RequestParam("id") BigDecimal id,
                                  @RequestParam("sysUserId") BigDecimal sysUserId,
                                  @RequestParam("status") int status,
                                  @RequestParam(value = "rejectText", required = false) String rejectText);
}